/*
 * @Author: XieQiu 雪球
 * @Date: 2021-05-17 15:33:04
 * @LastEditTime: 2021-05-18 09:13:08
 * @LastEditors: XieQiu 雪球
 * @Description: 产量详情管理接口
 */
import xjaxios from "@/api/index";

export default {
  /**
   * @description: 获取产量详情名称列表 *代表必填
   * @param {String/Number} page *
   * @param {String/Number} size *
   * @param {Object} entity {componyId: 1} *
   * @param {String} order 排序方式 ASC DESC 默认ASC
   * @param {String} sort 自定义排序方式 'createTime'
   * @return {Array}
   */
  queryPageByCondition(params) {
    return xjaxios.post("/batch/produceDetail/queryPageByCondition", params);
  },
  /**
   * @description: 获取所有产量详情 *代表必填
   * @param {String} organizationNo *
   * @return {Array}
   */
  queryByCondition(params) {
    return xjaxios.post("/batch/produceDetail/queryByCondition", {
      ...params
    });
  },
  /**
   * @description: 根据ID获取详细的产量详情信息 *代表必填
   * @param {String} inspectionRouteId *
   * @return {Array}
   */
  DetailqueryByCondition(params) {
    return xjaxios.post(`batch/produceDetail/queryByCondition`, { ...params });
  },
  /**
   * @description: 新增产量详情信息
   * @param {Object} formData *
   * @return {Object}
   */
  add(formData) {
    formData.organizationNo = sessionStorage.organizationNo
    return xjaxios.post("/batch/produceDetail/add", formData);
  },
  /**
   * @description: 编辑产量详情信息
   * @param {Object} formData *
   * @return {Object}
   */
  edit(formData) {
    formData.organizationNo = sessionStorage.organizationNo
    return xjaxios.post("/batch/produceDetail/edit", formData);
  },
  /**
   * @description: 批量删除数据
   * @param {Array} list *
   * @return {Object}
   */
  delById(list) {
    return xjaxios.get("/batch/produceDetail/delById", {
      id: list
    });
  }
};
